home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nct02130.geo / 00137.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  4.2 KB  |  183 lines

  1. on startMovie
  2.   Set_CDcounter(14)
  3.   initLesson()
  4.   CheckForTagWd()
  5. end
  6.  
  7. on TheinitCursor
  8.   initCursorCastNum()
  9.   initCursorList(1)
  10.   set CursorCastNum to getCursor(2)
  11.   cursor([CursorCastNum, CursorCastNum + 1])
  12. end
  13.  
  14. on checkScreenStatus
  15.   CheckRollOver()
  16.   CheckSnakeStatus()
  17.   go(the frame)
  18. end
  19.  
  20. on BlinkNext
  21.   if (the timer > getTimer()) and not soundBusy(2) then
  22.     startTimer()
  23.     if the name of cast the castNum of sprite get_NEXTSprite() = "NEXT" then
  24.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT_E"
  25.     else
  26.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT"
  27.     end if
  28.   end if
  29. end
  30.  
  31. on blinkHiLight
  32.   global LocalTime
  33.   if (the timer > getTimer()) and not soundBusy(2) and (LocalTime < 2) then
  34.     startTimer()
  35.     if the visible of sprite 22 then
  36.       set the visible of sprite 22 to 0
  37.     else
  38.       puppetSound("highlight1")
  39.       set the visible of sprite 22 to 1
  40.       set LocalTime to 1 + LocalTime
  41.     end if
  42.   end if
  43. end
  44.  
  45. on GoNext
  46.   if not get_Disabled() then
  47.     if Get_NEXT() = 1 then
  48.       InitLamp()
  49.       PlaySound("TIPSOUND.S01")
  50.     end if
  51.     sound stop 2
  52.     if Get_NEXT() = 7 then
  53.       GoNextMovie()
  54.     else
  55.       go("t" & Get_NEXT())
  56.     end if
  57.     Set_NEXT(Get_NEXT() + 1)
  58.   end if
  59. end
  60.  
  61. on stopMovie
  62.   sound stop 1
  63.   unLoad()
  64.   setEmptyCursor()
  65. end
  66.  
  67. on GoNextMovie
  68.   PlaySound("GOSOUND.SO1")
  69.   SaveHilite()
  70.   Add_CDcounter(1)
  71.   set cdNum to Get_CDcounter()
  72.   set movieName to item cdNum of Get_CurrentSnakeScreens()
  73.   go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
  74. end
  75.  
  76. on InitLamp
  77.   set the visible of sprite 33 to 0
  78.   set the visible of sprite 34 to 0
  79.   UpdateCursors(33, 0)
  80.   UpdateCursors(32, 3)
  81. end
  82.  
  83. on unSetMouseEvents
  84.   global puppetList
  85.   set puppetList to []
  86.   repeat with i = 1 to 48
  87.     add(puppetList, the puppet of sprite i)
  88.     if not (the puppet of sprite i) then
  89.       set the puppet of sprite i to 1
  90.     end if
  91.   end repeat
  92.   play frame "outLamp"
  93. end
  94.  
  95. on setMouseEvents
  96.   global puppetList
  97.   set the mouseDownScript to EMPTY
  98.   set the mouseUpScript to EMPTY
  99.   set the keyDownScript to EMPTY
  100.   set the keyUpScript to EMPTY
  101.   repeat with i = 1 to 48
  102.     if getAt(puppetList, i) = 0 then
  103.       set the puppet of sprite i to 0
  104.     end if
  105.   end repeat
  106.   play done
  107. end
  108.  
  109. on dont
  110.   dontPassEvent()
  111. end
  112.  
  113. on HandleLamp
  114.   sound stop 1
  115.   sound stop 2
  116.   if the name of cast the castNum of sprite 32 = "lamp_On" then
  117.     set the castNum of sprite 32 to the number of cast "lamp_Off"
  118.     set the visible of sprite 33 to 0
  119.     set the visible of sprite 34 to 0
  120.     UpdateCursors(34, 0)
  121.     set the castNum of sprite 34 to the number of cast "EXITLAMP"
  122.     updateStage()
  123.     unSetMouseEvents()
  124.   else
  125.     set the castNum of sprite 32 to the number of cast "lamp_On"
  126.     UpdateCursors(34, 3)
  127.     set the visible of sprite 33 to 1
  128.     set the visible of sprite 34 to 1
  129.     updateStage()
  130.     PlaySound("NCT02130.T01")
  131.     displayTip(34)
  132.   end if
  133.   updateStage()
  134. end
  135.  
  136. on displayTip theExitBtnSp
  137.   global exitTheLoop
  138.   set exitTheLoop to 0
  139.   set the mouseDownScript to "dont"
  140.   set the mouseUpScript to "dont"
  141.   set the keyDownScript to "dont"
  142.   set the keyUpScript to "dont"
  143.   set the exitLock to 0
  144.   repeat while not exitTheLoop
  145.     if the mouseCast = the number of cast "EXITLAMP" then
  146.       set the cursor of sprite 48 to [404, 405]
  147.     else
  148.       set the cursor of sprite 48 to [400, 401]
  149.     end if
  150.     if the mouseDown and (the mouseCast = the number of cast "EXITLAMP") then
  151.       switchExitLampButt(theExitBtnSp, "EXITLAMP_D")
  152.     end if
  153.   end repeat
  154.   set the exitLock to 1
  155.   set the cursor of sprite 48 to 0
  156.   HandleLamp()
  157. end
  158.  
  159. on switchExitLampButt spriteNum, castDown
  160.   global exitTheLoop
  161.   set flag to 0
  162.   set SaveCast to the castNum of sprite spriteNum
  163.   set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  164.   repeat while the mouseDown
  165.     set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  166.   end repeat
  167.   if flag = 1 then
  168.     set exitTheLoop to 1
  169.   end if
  170. end
  171.  
  172. on swapExitLampCast spriteNum, SaveCast, castDown
  173.   if rollOver(spriteNum) then
  174.     set the castNum of sprite spriteNum to the number of cast castDown
  175.     updateStage()
  176.     return 1
  177.   else
  178.     set the castNum of sprite spriteNum to the number of cast SaveCast
  179.     updateStage()
  180.     return 0
  181.   end if
  182. end
  183.